<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<div class="content-wrap">
        <div class="wrapper" style="bottom: 50px;">
            <ul class="nav nav-tabs">
                <li>
                    <a href="#"  onclick="loadDiv('mainCenterDiv','${ctx}/blood/bloodComponent/index')">血液成分字典维护列表</a>
                </li>
                <li class="active">
                    <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/blood/bloodComponent/form')">
                        <c:choose>
                            <c:when test="${bloodComponent.id==''|| bloodComponent.id==null}">
                                血液成分字典维护添加
                            </c:when>
                            <c:otherwise>血液成分字典维护修改</c:otherwise>
                        </c:choose>
                    </a>
                </li>
            </ul>
            <section class="panel panel-default">
                <div class="panel-body">
                    <div class="col-lg-12">
                        <form:form id="inputForm" data-parsley-validate="" modelAttribute="bloodComponent" onsubmit="return formSaveLoad('mainCenterDiv','inputForm','${ctx}/blood/bloodComponent/save','${ctx}/blood/bloodComponent/index');" method="post" class="form-horizontal">
                            <form:hidden path="id"/>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">血液成分代码：</label>
                                    <div class="col-sm-4">
                                        <form:input id="bloodCode" path="bloodCode" htmlEscape="false" class="form-control"  maxlength="10" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">血液成分名称：</label>
                                    <div class="col-sm-4">
                                        <form:input id="bloodName" path="bloodName" htmlEscape="false" class="form-control"  maxlength="40" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">保存天数：</label>
                                    <div class="col-sm-4">
                                        <form:input path="usefulLife" htmlEscape="false" class="form-control"  />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">保存温度：</label>
                                    <div class="col-sm-4">
                                        <form:input path="temperature" htmlEscape="false" class="form-control"  maxlength="24" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">计量单位：</label>
                                    <div class="col-sm-4">
                                        <form:input path="unit" htmlEscape="false" class="form-control"  maxlength="10" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">停止日期：</label>
                                    <div class="col-sm-4">
                                        <input name="stopDate" id="stopDate" htmlEscape="false" class="form-control Wdate"
                                               onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" value='<fmt:formatDate value="${bloodComponent.stopDate}" pattern="yyyy-MM-dd HH:mm:ss"/>'/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">排序序号：</label>
                                    <div class="col-sm-4">
                                        <form:input path="sort" htmlEscape="false" class="form-control"  />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-10">
                                        <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存">&nbsp;
                                        <input id="btnCancel" class="btn" type="button" value="返 回" onclick="loadDiv('mainCenterDiv','${ctx}/blood/bloodComponent/index')">
                                </div>
                            </div>
                        </form:form>
                    </div>

                </div>
            </section>
        </div>
    </div>
<script type="text/javascript">
    //如果是修改，代码和名称不能编辑
    var id = $('#id').val();
    if($.trim(id) != ''){
        $('#bloodCode').attr("disabled", true);
        $('#bloodName').attr("disabled", true);
    }
</script>